#ifndef _CAMERA_HPP
#define _CAMERA_HPP

#include "PhoenixInitializer.hpp"
#include "vec3.hpp"

namespace phx
{

// Distance is not allowed to be equal to 0, because then the math wont work properly.
// This class will automatically set distance to 0.0001f if there is an attempt to set to less than 0.0001f.
class Camera
{
public:
	Camera(vec3f &cameraPos = vec3f(0.0f, 0.0f, -50.0f), vec3f &targetPos = vec3f(0.0f, 0.0f, 0.0f));
	void rotateAroundTarget(vec3f &rotation);
	void setDistance(float distance);

	const glm::mat4& getMatrix(){ return mTransformation; }
	float getDistance(){ return mDistance; }
	friend class RenderWindow;
	friend class Model;
private:
	glm::mat4 mTransformation;
	float mDistance, mSideAngle, mUpAngle;
	vec3f mCameraPos, mTargetPos;
};

}

#endif